Ext.define('MyApp.view.FeedWindow', {
    extend: 'Ext.window.Window',
    alias: 'widget.feedwindow',

    width: 500,
    iconCls: 'feed',
    title: 'Add Feed',
    plain: true,

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'form',
                    itemId: 'form',
                    bodyPadding: '12 10 10',
                    items: [
                        {
                            xtype: 'combobox',
                            itemId: 'feed',
                            fieldLabel: 'Enter the URL of the feed to add',
                            labelAlign: 'top',
                            msgTarget: 'under',
                            autoSelect: false,
                            displayField: 'title',
                            queryMode: 'local',
                            store: 'DefaultFeedsStore',
                            valueField: 'url',
                            anchor: '100%'
                        }
                    ]
                }
            ],
            dockedItems: [
                {
                    xtype: 'container',
                    height: 24,
                    margin: 8,
                    layout: {
                        align: 'stretch',
                        pack: 'end',
                        type: 'hbox'
                    },
                    dock: 'bottom',
                    items: [
                        {
                            xtype: 'button',
                            itemId: 'add',
                            width: 80,
                            text: 'Add Feed'
                        },
                        {
                            xtype: 'button',
                            itemId: 'cancel',
                            margin: '0 0 0 4',
                            width: 80,
                            text: 'Cancel'
                        }
                    ]
                }
            ]
        });

        me.callParent(arguments);
    }

});